Make wayland load cursors on demand
authorMatthias Clasen <mclasen@redhat.com>
Fri, 24 Jan 2020 18:33:13 +0000 (13:33 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 24 Jan 2020 22:27:45 +0000 (17:27 -0500)
commit4e58541d5243d71980ebf069eb37570441e4d51e
tree539f3a44b9417c1ee0f33b94988902b68ad3b2cf
parent53bc1d60c4686273db591b94e07a2bd9a4cafe6a
Make wayland load cursors on demand

Copy just enough of libwayland-cursor to make our own
loading. This lets us drop the dependency on libwayland-cursor,
and changes the startup cost for cursor theme loading
from 25ms to 0.1ms.

At the same time, simplify the handling of scaled cursors -
instead of creating an array of theme objects, just make a
single theme object provide all scaled cursor sizes.
13 files changed:
gdk/wayland/cursor/meson.build [new file with mode: 0644]
gdk/wayland/cursor/os-compatibility.c [new file with mode: 0644]
gdk/wayland/cursor/os-compatibility.h [new file with mode: 0644]
gdk/wayland/cursor/wayland-cursor.c [new file with mode: 0644]
gdk/wayland/cursor/wayland-cursor.h [new file with mode: 0644]
gdk/wayland/cursor/xcursor.c [new file with mode: 0644]
gdk/wayland/cursor/xcursor.h [new file with mode: 0644]
gdk/wayland/gdkcursor-wayland.c
gdk/wayland/gdkdisplay-wayland.c
gdk/wayland/gdkdisplay-wayland.h
gdk/wayland/gdkprivate-wayland.h
gdk/wayland/meson.build
meson.build